home *** CD-ROM | disk | FTP | other *** search
Text File | 1992-06-01 | 3.2 KB | 199 lines | [mlts/slnk] |
-
-
-
-
-
-
-
-
-
-
- ! "US Robotics Courier HST Dual"
- !
- ! ^1 is dial string
- !
- !---------------------------------------------------------------
- ! Main entry point for script
- !
- @ORIGINATE
- @ANSWER
- !
- ! Configure the serial port for 9600, no parity, 8 data, 1 stop
- !
- serreset 9600, 0, 8, 1
- !
- ! Init the modem
- ! Factory, DTR normal, no answer, echo off, hardware CTS, no ARQ,
- ! extended results
- !
- matchclr
- matchstr 1 1 "OK\13\10"
- write "AT&F&D2S0=0E0&H1&M0X4B0&K3\13"
- matchread 30
- jump 59
- !
- ! The modem is ready so enable answering, or originate a call
- !
- @LABEL 1
- pause 5
- ifANSWER 5
- note "Dialing ^1" 3
- write "ATDT^1\13"
- jump 20
- !
- !---------------------------------------------------------------
- ! @ANSWER
- ! Set up the modem to answer
- !
- @LABEL 5
- write "ATS0=1\13"
- matchstr 1 20 "OK\13\10"
- matchread 30
- jump 59
- !
- !---------------------------------------------------------------
- ! Connection result strings
- !
- @LABEL 10
- userhook 1
- note "Answering phone…" 2
- jump 20
- !
- @LABEL 11
- note "Communicating at 1200 bps." 2
- serreset 1200, 0, 8, 1
- jump 19
- !
- @LABEL 12
- note "Communicating at 2400 bps." 2
- serreset 2400, 0, 8, 1
- jump 19
- !
- @LABEL 13
- note "Communicating at 4800 bps." 2
- serreset 4800, 0, 8, 1
- jump 19
- !
- @LABEL 14
- note "Communicating at 7200 bps." 2
- serreset 9600, 0, 8, 1
- CommunicatingAt 7200
- jump 19
- !
- @LABEL 15
- note "Communicating at 9600 bps." 2
- serreset 9600, 0, 8, 1
- jump 19
- !
- @LABEL 16
- note "Communicating at 12000 bps." 2
- serreset 19200, 0, 8, 1
- CommunicatingAt 12000
- jump 19
- !
- @LABEL 17
- note "Communicating at 14400 bps." 2
- serreset 19200, 0, 8, 1
- CommunicatingAt 14400
- jump 19
- !
- !---------------------------------------------------------------
- ! Return control to the calling program
- !
- @LABEL 18
- HSReset 0 1 0 0 0 0
- ifANSWER 19
- pause 30
- @LABEL 19
- exit 0
- !
- !---------------------------------------------------------------
- ! Answer and Dial result strings
- !
- @LABEL 20
- matchstr 1 10 "RING\13\10"
- matchstr 2 11 "CONNECT 1200\13\10"
- matchstr 3 12 "CONNECT 2400\13\10"
- matchstr 4 13 "CONNECT 4800\13\10"
- matchstr 5 14 "CONNECT 7200\13\10"
- matchstr 6 15 "CONNECT 9600\13\10"
- matchstr 7 16 "CONNECT 12000\13\10"
- matchstr 8 17 "CONNECT 14400\13\10"
- matchstr 9 50 "NO CARRIER\13\10"
- matchstr 10 50 "ERROR\13\10"
- matchstr 11 52 "NO DIAL TONE\13\10"
- matchstr 12 53 "BUSY\13\10"
- matchstr 13 54 "NO ANSWER\13\10"
- matchread 700
- jump 20
- !
- !---------------------------------------------------------------
- ! 50: error messages
- !
- @LABEL 50
- exit -6021
- !
- @LABEL 52
- exit -6020
- !
- @LABEL 53
- exit -6022
- !
- @LABEL 54
- exit -6023
- !
- @LABEL 59
- exit -6019
- !
- !---------------------------------------------------------------
- ! Hang up the modem
- !
- @HANGUP
- settries 0
- HSReset 0 0 0 0 0 0
- !
- @LABEL 61
- !
- ! Ask the modem to hang up
- !
- write "ATH\13"
- matchclr
- matchstr 1 62 "NO CARRIER\13\10"
- matchstr 2 62 "OK\13\10"
- matchstr 3 62 "ERROR\13\10"
- matchread 30
- !
- ! The modem did not hang up. Try to get its attention.
- !
- inctries
- iftries 3 62
- write "+++"
- matchclr
- matchstr 1 61 "OK\13\10"
- matchread 8
- !
- ! Escape sequence did not work, try DTR.
- !
- DTRClear
- pause 15
- DTRSet
- pause 15
- jump 61
- !
- @LABEL 62
- ! recall the factory settings
- pause 15
- write "AT&F\13"
- matchclr
- matchstr 1 63 "OK\13\10"
- matchread 30
- !
- @LABEL 63
- pause 5
- matchstr 1 64 "OK\13\10"
- write "ATS0=0\13"
- matchread 20
- !
- @LABEL 64
- exit 0
-